Remove (most of) the -c handling from the GUI. This should help the
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 13 May 2014 04:45:57 +0000 (04:45 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 13 May 2014 04:45:57 +0000 (04:45 +0000)
problem that Peter Shepheard stumbled into.

gpsbabel/gui/advdlg.cc
gpsbabel/gui/advdlg.h
gpsbabel/gui/mainwindow.cc

index 3bb1d9366f9b4d53e60ae628edecd9ae492000eb..cf32bc580ad95445e434afa99a13ba5b266a910f 100644 (file)
 //------------------------------------------------------------------------
 AdvDlg::AdvDlg(QWidget* parent,
               bool &synthShortNames,
-              bool &enableCharSetXform,
               bool &previewGmap,
               int  &debugLevel):
   QDialog(parent),
   synthShortNames_(synthShortNames),
-  enableCharSetXform_(enableCharSetXform),
   previewGmap_(previewGmap),
   debugLevel_(debugLevel)
 {
   ui_.setupUi(this);
   ui_.synthShortNames->setChecked(synthShortNames);
-  ui_.enableCharSetXform->setChecked(enableCharSetXform);
   ui_.previewGmap->setChecked(previewGmap);
   ui_.debugCombo->setCurrentIndex(debugLevel+1);
   ui_.buttonBox->button(QDialogButtonBox::Ok)->setIcon(QIcon(":images/ok"));
@@ -51,7 +48,6 @@ AdvDlg::AdvDlg(QWidget* parent,
 void AdvDlg::acceptClicked()
 {
   synthShortNames_ = ui_.synthShortNames->isChecked();
-  enableCharSetXform_ = ui_.enableCharSetXform->isChecked();
   previewGmap_ = ui_.previewGmap->isChecked();
   debugLevel_ = ui_.debugCombo->currentIndex()-1;
   accept();
index 1f4ce4873262405c0ec3f510f98da2aa0b43d949..0cec3d216e4f4d4aa59d840f29cc55eb1b52e99b 100644 (file)
@@ -30,7 +30,6 @@ class AdvDlg: public QDialog {
 public:
   AdvDlg(QWidget* parent, 
    bool &synthShortNames_,
-   bool &enableCharSetXform_,
    bool &previewGmap_,
    int   &debugLevel_);
   QPushButton* formatButton() { return ui_.formatButton; };
@@ -38,7 +37,6 @@ public:
 private:
   Ui_AdvUi ui_;
   bool &synthShortNames_;
-  bool &enableCharSetXform_;
   bool &previewGmap_;
   int  &debugLevel_;
 
index b21e69e17ce03073a9c73a2faf3d25851a814b34..1e44235261e64fe66c975bd9caab0351f3ff17ef 100644 (file)
@@ -406,10 +406,6 @@ void MainWindow::loadCharSetCombos()
 //------------------------------------------------------------------------
 void MainWindow::checkCharSetCombos()
 {
-  ui_.inputCharSetCombo->setEnabled(babelData_.enableCharSetXform_);
-  ui_.outputCharSetCombo->setEnabled(babelData_.enableCharSetXform_);
-  ui_.inputCharSetCombo->setVisible(babelData_.enableCharSetXform_);
-  ui_.outputCharSetCombo->setVisible(babelData_.enableCharSetXform_);
 }
 //------------------------------------------------------------------------
 void MainWindow::inputFileOptBtnClicked()
@@ -967,10 +963,6 @@ void MainWindow::applyActionX()
   if (babelData_.debugLevel_ >=0)     args << QString("-D%1").arg(babelData_.debugLevel_);
   if (babelData_.synthShortNames_)    args << "-s";
 
-  // Input char set if specified
-  if (babelData_.enableCharSetXform_ && babelData_.inputCharSet_ != QString())
-    args << "-c" << babelData_.inputCharSet_;
-
   Format ifmt = formatList_[currentComboFormatIndex(ui_.inputFormatCombo)];
   Format ofmt = formatList_[currentComboFormatIndex(ui_.outputFormatCombo)];
 
@@ -1005,10 +997,6 @@ void MainWindow::applyActionX()
   // --- Filters!
   args << filterData_.getAllFilterStrings();
 
-  // Output char set if specified
-  if (babelData_.enableCharSetXform_ && babelData_.outputCharSet_ != QString())
-    args << "-c" << babelData_.outputCharSet_;
-
   // Output type, with options
   if (babelData_.outputType_ != BabelData::noType_) {
     bool outIsFile = (babelData_.outputType_ == BabelData::fileType_);
@@ -1195,7 +1183,7 @@ void MainWindow::resetFormatDefaults()
 void MainWindow::moreOptionButtonClicked()
 {
   AdvDlg advDlg(0, babelData_.synthShortNames_,
-        babelData_.enableCharSetXform_, babelData_.previewGmap_, babelData_.debugLevel_);
+                babelData_.previewGmap_, babelData_.debugLevel_);
   connect(advDlg.formatButton(), SIGNAL(clicked()),
          this, SLOT(resetFormatDefaults()));
   advDlg.exec();